<?php
/**
 * Detects if the user is logged in. This one detects that the user is logged in as admin.
 * The one in the default module with the same name detects that the user is logged in as a customer.
 * @todo I'm not sure I like the way I've done this (with the multiple isLoggedIn classes)
 */
class ImpSoft_View_Helper_IsLoggedIn {

	public function isLoggedIn() {
	
		$auth = Zend_Auth::getInstance();
		$user = $auth->getIdentity();
		if (!is_null($user) && $user->user_role == "admin") {
			return true;
		}
		return false;
	
	}

}